package ar.com.temporis.manufacturing.domain;

import ar.com.temporis.framework.domain.Entity;
import ar.com.temporis.system.domain.NamedObject;

/**
 * Business state of a {@link WorkOrder}.
 * 
 * @author matias
 *
 */
// it would be nice to make it ValueObjet... but just for persistence issues I will use it as an Entity
public class WorkOrderState extends Entity implements NamedObject {

	public static final WorkOrderState CLOSED = new WorkOrderState(1, "CLOSED");
	public static final WorkOrderState REJECTED = new WorkOrderState(2, "REJECTED");
	public static final WorkOrderState APPROVED = new WorkOrderState(3, "APPROVED");
	
	private String name;

	public WorkOrderState(String string) {
		this();
		this.name = string;
	}

	// keep this constructor... hibernate will need it
	public WorkOrderState() {
		
	}

	public WorkOrderState(long id, String name) {
		this(name);
		this.setId(id);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
